package com.oa.android.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.oa.android.R;
import com.oa.android.utils.UConstants;
import com.oa.android.utils.Util;

import butterknife.ButterKnife;
import butterknife.InjectView;

/**
 * Created by zouqh on 2016/6/22.
 */
public class InfoActivity extends Activity implements View.OnClickListener {

    @InjectView(R.id.close)
    ImageView close;
    @InjectView(R.id.title_text)
    TextView titleText;

    @InjectView(R.id.name)
    TextView name;
    @InjectView(R.id.accont)
    TextView accont;
    @InjectView(R.id.jiaos)
    TextView jiaos;
    @InjectView(R.id.bumen)
    TextView bumen;
    @InjectView(R.id.comP)
    TextView comP;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.info_activity);
        ButterKnife.inject(this);
        titleText.setText("用户信息");
        close.setOnClickListener(this);
        if (Util.NoNull(UConstants.EmpName)) {
            name.setText("姓名：" + UConstants.EmpName);
            accont.setText("账号：" + UConstants.EmpId);
            jiaos.setText("角色：" + UConstants.USERBUMEN);
            bumen.setText("部门：" + UConstants.USERBUMEN);
            comP.setText("公司：" + UConstants.ComName);
        }

    }

    @Override
    public void onClick(View v) {

        switch (v.getId()){
            case R.id.close:
                finish();
                break;
        }
    }
}
